From: Keir Fraser Date: Wed, 30 Dec 2009 12:46:16 +0000 (+0000) Subject: libxl: define errors as an enum instead of define random values. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~12801 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22%22/%22http:/www.example.com/cgi/%22https:/%22%22?a=commitdiff_plain;h=94552247809fafcf8e71a76cb0ec9b864c46836e;p=xen.git libxl: define errors as an enum instead of define random values. Signed-off-by: Vincent Hanquez --- diff --git a/tools/libxl/libxl.h b/tools/libxl/libxl.h index 7bfa4e5941..7318b5184d 100644 --- a/tools/libxl/libxl.h +++ b/tools/libxl/libxl.h @@ -226,10 +226,13 @@ typedef struct { bool power_mgmt; } libxl_device_pci; -#define ERROR_FAIL (-2) -#define ERROR_NI (-101) -#define ERROR_NOMEM (-1032) -#define ERROR_INVAL (-1245) +enum { + ERROR_VERSION = -1, + ERROR_FAIL = -2, + ERROR_NI = -3, + ERROR_NOMEM = -4, + ERROR_INVAL = -5, +}; /* context functions */ int libxl_ctx_init(struct libxl_ctx *ctx);